﻿using System.Collections.Generic;
using SinBiota.Model.Entities;

namespace SinBiota.Model.Persistence.Repositories.Interfaces
{
    public interface IOccurrenceRepository : IRepository<Occurrence, int>
    {
        IEnumerable<Occurrence> FindByTaxonomicGroupId(int taxonomicGroupId);
        IEnumerable<Occurrence> FindByKeyword(string keyword);
        IEnumerable<Occurrence> FindByProjectCoordinator(string name);
        IEnumerable<Occurrence> FindByProjectMember(string name);
        IEnumerable<Occurrence> FindByPublication(string name);
        IEnumerable<Occurrence> FindByAmbient(Ambient ambient);
        IEnumerable<Occurrence> FindByAuthorName(string name);
        IEnumerable<Occurrence> FindByMunicipalityId(int municipalityId);
        IEnumerable<Occurrence> FindByProjectId(int projectId);
        IEnumerable<Occurrence> FindByUsername(string username);
        IEnumerable<LegacyTaxonomicGroup> FindAllLegacyTaxonomicGroups();
        IEnumerable<Occurrence> FindByTaxon(string searchField);
        IEnumerable<Occurrence> FindBySquareCoordinates(double nwLat, double nwLong, double seLat, double seLong);

        // Statistics:
        int NumberOfTaxonomicGroups();
        int NumberOfAuthors();

        IDictionary<string, int> OccurrencesByAmbient();
        IDictionary<string, int> OccurrencesByDrainageBasin();
        IDictionary<string, int> OccurrencesByMunicipality();
        IDictionary<string, int> OccurrencesByConservationUnit();
        IDictionary<string, int> OccurrencesByTaxonomicGroup();
        IDictionary<string, int> OccurrencesByMonthYear();

        IDictionary<string, int> SpecimensByAmbient();
        IDictionary<string, int> SpecimensByDrainageBasin();
        IDictionary<string, int> SpecimensByMunicipality();
        IDictionary<string, int> SpecimensByConservationUnit();
        IDictionary<string, int> SpeciesByTaxonomicGroup();

        IDictionary<string, int> SpeciesByMonthYear();
        IDictionary<string, int> Top10Species();

    }
}
